package com.lagou.edu.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangjinshan
 * @version 1.0
 * @description
 * @date 2021/8/31 上午10:41
 */
@RestController
@RequestMapping("/config")
@RefreshScope
public class ConfigController {

    @Value("${lagou.message}")
    private String lagouMessage;

    @GetMapping("/viewConfig")
    public String viewConfig(){
        return lagouMessage;
    }
}
